import Vue from 'vue'
import Router from 'vue-router'
import login from '@/view/login'
import index from '@/view/index'
import exam from '@/view/exam'
import addCourse from '@/view/addCourse'
import addPlan from '@/view/addPlan'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: 'login',
      component: login
    },
    {
      path: '/index',
      name: 'index',
      component: index,
      redirect: {name: 'exam'},
      children: [
        {
          path: '/exam',
          name: 'exam',
          component: exam
        },
        {
          path: '/addCourse',
          name: 'addCourse',
          component: addCourse
        },
        {
          path: '/addPlan',
          name: 'addPlan',
          component: addPlan
        }
      ]
    }
  ]
})
